﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChietTinhHuongDanVien.aspx.cs" Inherits="DLV.BackEnd.Pages.ChietTinhHuongDanVien" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Import Namespace="System.Globalization" %>
<%@ Import Namespace="DLV.Data.Entities" %>
<%@ Import Namespace="DLV.Library.Utilities" %>

<asp:content id="Content1" contentplaceholderid="placeHolderContent" runat="server">
    <style>
        .report {
            margin-top: 40px;
        }

        .head {
            width: 100%;
            overflow: hidden;
        }

            .head > .logo {
                width: 20%;
                float: left;
                margin-right: 1%;
            }

                .head > .logo img {
                    display: block;
                    margin: 0 auto;
                }

            .head > .table {
                width: 78%;
                float: right;
            }

                .head > .table > table {
                    width: 100%;
                    border-top: 1px solid #000;
                    border-left: 1px solid #000;
                }

                    .head > .table > table th {
                        padding: 10px 0;
                        font-size: 20px;
                        border-bottom: 1px solid #000;
                        border-right: 1px solid #000;
                        background-color: #F2DCDB;
                    }

                    .head > .table > table td {
                        padding: 7px;
                        border-bottom: 1px solid #000;
                        border-right: 1px solid #000;
                    }

        .service {
            width: 100%;
            margin-top: 20px;
        }

            .service > table {
                width: 100%;
                margin-bottom: 20px;
                border-top: 1px solid #000;
                border-left: 1px solid #000;
            }

                .service > table th {
                    padding: 5px 0;
                    border-bottom: 1px solid #000;
                    border-right: 1px solid #000;
                    background-color: #F2DCDB;
                }

                    .service > table th.first {
                        background-color: #92CDDC;
                        width: 8%;
                    }

                .service > table td {
                    padding: 7px;
                    border-bottom: 1px solid #000;
                    border-right: 1px solid #000;
                }

                .service > table .tr {
                    text-align: right;
                }

        div {
            margin: 0;
            padding: 0;
        }
    </style>
    
    <div class="report">
        <div class="head">
            <div class="logo">
                <a href="http://dulichviet.com.vn"><img src="/images/logo.png" /></a>
            </div>    
            <div class="table">
                <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <th colspan="4">BẢNG TÍNH GIÁ</th>
                    </tr>
                    <tr>
                        <td><b>Tên đoàn</b></td>
                        <td><%=tourInfo.TourName %></td>
                        <td><b>Code đoàn</b></td>
                        <td>DLV<%=tourInfo.TourId %></td>
                    </tr>
                    <tr>
                        <td><b>Loại hình đoàn</b></td>
                        <td><%=tourInfo.GroupType %></td>
                        <td><b>Loại tour</b></td>
                        <td><%=tourInfo.TourTypeId %></td>
                    </tr>
                    <tr>
                        <td><b>Điểm khởi hành</b></td>
                        <td><%=tourInfo.LocationBegin %></td>
                        <td><b>Hành trình</b></td>
                        <td><%=tourInfo.Schedule %></td>
                    </tr>
                    <tr>
                        <td><b>Số lượng khách</b></td>
                        <td>
                            Người lớn:
                            <asp:Label class="lbTour" ID="lbQuantityAdultsTour" runat="server"></asp:Label> 
                            <asp:TextBox  id="txtQuantityAdultsTour" runat="server" Width="50px" ></asp:TextBox>
                            |
                            Trẻ em:
                            <asp:Label class="lbTour" ID="lbQuantityChildTour" runat="server"></asp:Label>
                            <asp:TextBox  id="txtQuantityChildTour" runat="server" Width="50px" ></asp:TextBox>
                        </td>
                        <td><b>Đối tượng khách</b></td>
                        <td>Chọn đối tượng khách</td>
                    </tr>
                    <tr>
                        <td><b>Số hướng dẫn viên</b></td>
                        <td>Chọn số</td>
                        <td><b>Yêu cầu</b></td>
                        <td>Chọn loại HDV</td>
                    </tr>
                    <tr>
                        <td><b>Ngày khởi hành</b></td>
                        <td>
                            <asp:Label class="lbTour" ID="lbBeginDateTour" runat="server"></asp:Label>
                            <input class="ctTour" type="text" id="dteBeginDateTour" placeholder="Click để chọn ngày" readonly="readonly" runat="server" />
                            <asp:DropDownList class="ctTour" ID="ddlBeginHourTour" runat="server" Width="55px"></asp:DropDownList>
                            <asp:DropDownList class="ctTour" ID="ddlBeginMinuteTour" runat="server" Width="55px"></asp:DropDownList>
                        </td>
                        <td><b>Ngày kết thúc</b></td>
                        <td>
                            <asp:Label class="lbTour" ID="lbEndDateTour" runat="server"></asp:Label>
                            <input class="ctTour" type="text" id="dteEndDateTour" placeholder="Click để chọn ngày" readonly="readonly" runat="server" />
                            <asp:DropDownList class="ctTour" ID="ddlEndHourTour" runat="server" Width="55px"></asp:DropDownList>
                            <asp:DropDownList class="ctTour" ID="ddlEndMinuteTour" runat="server" Width="55px"></asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td><b>Tổng số ngày</b></td>
                        <td>
                            <asp:Label class="lbTour" ID="lbTotalDayTour" runat="server"></asp:Label> 
                            <asp:TextBox class="ctTour" id="txtTotalDayTour" runat="server" Width="50px" ></asp:TextBox>
                        </td>
                        <td><b>Tổng số đêm</b></td>
                        <td>
                            <asp:Label class="lbTour" ID="lbTotalNightTour" runat="server"></asp:Label> 
                            <asp:TextBox class="ctTour" id="txtTotalNightTour" runat="server" Width="50px" ></asp:TextBox>
                        </td>
                    </tr>
                     <tr>
                        <td><b>Mùa</b></td>
                        <td><%=tourInfo.Season %></td>
                        <td><b>Thị trường</b></td>
                        <td><%=tourInfo.MartName %></td>
                    </tr>
                </table>
                
                <input  id="btnUpdateTour" type="button" value="Cap nhat" />
               
				<asp:LinkButton class="ctTour" ID="lbtSave" runat="server" Text="" onclick="lbtSave_Click" CssClass="toolbar">
					<input class="ctTour" id="btnSaveTour" type="button" value="Luu" />
				</asp:LinkButton>
						 
				<asp:LinkButton class="ctTour" ID="lbtClose" runat="server" Text="" onclick="lbtClose_Click" 
                    CssClass="toolbar" CausesValidation="False">
					<input class="ctTour" id="btnCloseTour" type="button" value="Huy" />
				</asp:LinkButton>
						    

            </div>
        </div>
        
       
        <div class="service">
            <%--Huong dan vui-----------------------------------------------------------------------------------------------%>
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <th class="first">HƯỚNG DẪN VIÊN</th>
                    <th>LOAI HDV</th>
                    <th>NGÀY KH</th>
                    <th>NGÀY<br/>KẾT THÚC</th>
                    <th>TỔNG SỐ NGÀY</th>
                    <th>NGOAI NGU</th>
                    <th>GIOI TINH</th>
                    <th>TRINH DO</th>
                    <th>HUONG DAN VIEN</th>
                    <th>TIỀN CÔNG</th>
                    <th>TIỀN TIP</th>
                    <th>VAT</th>
                    <th>TỔNG CHI PHÍ</th>
                    <th>GHI CHÚ</th>
                    <th></th>
                </tr>
                <% foreach (DLV.Data.Entities.CalculatorInfo travelGuideCashInfo in TravelGuideCashs)
                   {%>
                <tr class="ListTravelGuide" id="TravelGuide-"<%=travelGuideCashInfo.CalculatorId %>>
                    <td></td>
                    <td><%=travelGuideCashInfo.TravelGuideType %></td>
                    <td><%=travelGuideCashInfo.DateBegin.ToString("dd/MM/yyyy") %></td>
                    <td><%=travelGuideCashInfo.DateEnd.ToString("dd/MM/yyyy") %></td>
                    <td class="tr"><%=(travelGuideCashInfo.DateEnd-travelGuideCashInfo.DateBegin).Days %></td>
                    <td><%=travelGuideCashInfo.LanguageName %></td>
                    <td><%=travelGuideCashInfo.Gender %></td>
                    <td><%=travelGuideCashInfo.Level %></td>
                    <td><%=travelGuideCashInfo.FullName %></td>
                    
                    
                    <td class="tr"><%=travelGuideCashInfo.PriceAdults.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td class="tr"><%=travelGuideCashInfo.PriceChild.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td><%=travelGuideCashInfo.Vat%></td>
                    <td class="tr"><%=travelGuideCashInfo.TotalPriceTravelGuide%></td>
                    
                    <td></td>
                    <td>
                        <input class="btnUpdateTravelGuide"  type="button" value="Cập nhật" calculatorid="<%=travelGuideCashInfo.CalculatorId %>" />
                        <input class="btnDeleteTravelGuide"  type="button" value="Xóa" calculatorid="<%=travelGuideCashInfo.CalculatorId %>" />
                    </td>
                </tr>
                <% } %>
                <tr id="new-travelGuide">
                    <td></td>
                    <td><asp:DropDownList ID="ddlTravelGuideType" runat="server" Width="70px"></asp:DropDownList></td>
                    <td><input type="text" id="dteBeginDateTravelGuide" style="width:100px;" placeholder="Clic chọn ngày" readonly="readonly" runat="server" /></td>
                    <td><input type="text" id="dteEndDateTravelGuide" style="width:100px;" placeholder="Clic chọn ngày" readonly="readonly" runat="server" /></td>
                    <td class="tr"><asp:TextBox ID="txtQuantityDateTravelGuide" runat="server" Width="50px"></asp:TextBox></td>
                    <td><asp:DropDownList ID="ddlLanguageTravelGuide" runat="server" Width="70px"></asp:DropDownList></td>
                    <td><asp:DropDownList ID="ddlGenderTravelGuide" runat="server" Width="70px"></asp:DropDownList></td>
                    <td><asp:DropDownList ID="ddlLevelTravelGuide" runat="server" Width="70px"></asp:DropDownList></td>
                    <td><asp:DropDownList ID="ddlTravelGuide" runat="server" Width="70px"></asp:DropDownList></td>
                    <td class="tr"><asp:TextBox ID="txtPriceTravelGuide" runat="server" Width="50px"></asp:TextBox></td>
                    <td class="tr"><asp:TextBox ID="txtPriceTipTravelGuide" runat="server" Width="50px"></asp:TextBox></td>
                    <td><asp:TextBox ID="txtVatTravelGuide" runat="server" Width="50px"></asp:TextBox></td>
                    <td class="tr"><asp:TextBox ID="txtTotalPriceTravelGuide" runat="server" Width="50px"></asp:TextBox></td>
                    <td></td>
                    <td>
                        <input id="btnInsertTravelGuide" class="btnInsertTravelGuide"  type="button" value="Them" calculatorid="-1" />
                        <input id="btnDeleteTravelGuide" class="btnDeleteTravelGuide"  type="button" value="Huy" calculatorid="-1" />
                    </td>
                </tr>
                <tr>
                    <td colspan="12"><b>TỔNG CHI PHÍ ĐOÀN</b></td>
                    <td class="tr"><%=TotalTravelGuidePrices.ToString("#,###", new CultureInfo("vi-VN")) %></td>
                    <td></td>
                    
                </tr>
            </table>
            
            </div>
        </div>

   
 <script src="../js/jquery.ChietTinhHDV.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            CalculatorTravelGuide('#<%=ddlLanguageTravelGuide.ClientID%>', '#<%=ddlGenderTravelGuide.ClientID%>', '#<%=ddlLevelTravelGuide.ClientID%>', '#<%=ddlTravelGuide.ClientID%>', '#<%=ddlTravelGuideType.ClientID%>', '#<%=dteBeginDateTravelGuide.ClientID%>', '#<%=dteEndDateTravelGuide.ClientID%>', '#<%=txtQuantityDateTravelGuide.ClientID%>', '#<%=txtPriceTravelGuide.ClientID%>', '#<%=txtPriceTipTravelGuide.ClientID%>', '#<%=txtVatTravelGuide.ClientID%>', '#<%=txtTotalPriceTravelGuide.ClientID%>','<%=tourInfo.BeginDate.ToShortDateString()%>','<%=tourInfo.EndDate.ToShortDateString()%>','<%=tourInfo.TourId%>');

        });
    </script>

    <link rel="stylesheet" href="/css/datepicker/jquery.ui.all.css" />
	<script type="text/javascript" src="/js/ui/jquery.ui.core.js"></script>
	<script type="text/javascript" src="/js/ui/jquery.ui.datepicker.js"></script>
	<script type="text/javascript">
	    $(function () {
	        

	      
	        $("#<%= dteBeginDateTour.ClientID %>").datepicker({

	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });
	        $("#<%= dteEndDateTour.ClientID %>").datepicker({

	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });
	        
	        $("#<%= dteBeginDateTravelGuide.ClientID %>").datepicker({

	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });
	        $("#<%= dteEndDateTravelGuide.ClientID %>").datepicker({

	            changeMonth: true,
	            changeYear: true,
	            dateFormat: "dd/mm/yy"
	        });
	    });
	</script>


    

    
    

</asp:content>
